package com.forstudy.wiki.service;


import com.forstudy.wiki.domain.Demo;
import com.forstudy.wiki.domain.DemoExample;
import com.forstudy.wiki.mapper.DemoMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class DemoService {

    @Resource // 这是jdk注解也可以用springboot的Autowired
    private DemoMapper demoMapper;

    private static final Logger LOG = LoggerFactory.getLogger(DemoService.class);

    public List<Demo> list() {
        DemoExample de = new DemoExample();
        LOG.info("demo list count : ===>" + demoMapper.countByExample(null));
        return demoMapper.selectByExample(null);
    }
}
